﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Mirus.Corelib.Text.String
{
    public class Utility
    {
        public static bool Contains(string Str, char c)
        {
            foreach (int num in Str)
            {
                if (num == (int)c)
                    return true;
            }
            return false;
        }

        public static int IndexOf(string str, char c)
        {
            int num1 = 0;
            foreach (int num2 in str)
            {
                if (num2 == (int)c)
                    return num1;
                num1++;
            }
            return -1;
        }

        public static int LastIndexOf(string This, char ch)
        {
            int num1 = -1;
            int num2 = 0;
            foreach (int num3 in This)
            {
                if (num3 == (int)ch)
                    num1 = num2;
                num2++;
            }
            return num1;
        }
    }
}
